package com.citycloud.ccuap.tc.sync.controller;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.citycloud.ccuap.commons.json.JSONData;
import com.citycloud.ccuap.tc.sync.dto.DepartmentListDto;
import com.citycloud.ccuap.tc.sync.dto.DepartmentQuery;
import com.citycloud.ccuap.tc.sync.service.DepartmentService;
import com.citycloud.ccuap.tc.common.page.CommonPager;

import io.swagger.annotations.Api;

@Api(tags = "datac部门控制类", value = "datac控制类-DatacDeptmentControler")
@RestController
@RequestMapping(value = "/v1/datac/app/datacDeptment")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;


    @GetMapping("/importList")
    public JSONData<CommonPager<DepartmentListDto>> getImportList(DepartmentQuery page) {
        CommonPager<DepartmentListDto> departmentImportList = departmentService.getDepartmentImportList(page);
        JSONData<CommonPager<DepartmentListDto>> success = JSONData.of(departmentImportList);
        return success;
    }

}
